package com.weu.contorller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("backstage")
@PreAuthorize("hasRole('admin')")
public class adminController {
    @RequestMapping("/toadminlogin")
    public String toLogin(){
        return "backstage/login";
    }
    @RequestMapping("index")
    public String toAdminIndex(){
        return "backstage/index";
    }
}
